package com.frontop.bigdata.modules.controller;


import com.alibaba.fastjson.JSONObject;
import com.frontop.bigdata.modules.model.BigDataProject;
import com.frontop.bigdata.modules.service.BigDataOverviewService;
import com.frontop.common.domain.UserJurisdiction;
import com.frontop.common.util.JwtUtil;
import com.frontop.common.util.ResultJsonUtil;
import com.frontop.dubbo.api.auth.Oauth2Api;
import io.jsonwebtoken.Claims;
import io.swagger.annotations.ApiOperation;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.security.core.Authentication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;

/**
 * <p>
 * 百度大数据--数据总览 前端控制器
 * </p>
 *
 * @author YangJia
 * @since 2022-02-14
 */
@RestController
@RequestMapping("/big-data-overview")
public class BigDataOverviewController {
    @Autowired
    BigDataOverviewService bigDataOverviewService;

    @ApiOperation(value = "刷新网点指定日期24小时数据")
    @GetMapping("/refresh/{siteId}/{refreshDate}")
    public ResultJsonUtil<Object> pullPage(
            @PathVariable("siteId") Long siteId,
            @PathVariable("refreshDate") String refreshDate) {
        bigDataOverviewService.pullDataOverview(siteId,refreshDate);
        return new ResultJsonUtil().success("刷新成功");
    }

}
